home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
pswdprot
/
main.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
3KB
|
122 lines
VERSION 2.00
Begin Form Mainfrm
BackColor = &H00000000&
BorderStyle = 0 'None
ClientHeight = 5760
ClientLeft = 1995
ClientTop = 2760
ClientWidth = 8730
ControlBox = 0 'False
Height = 6165
Left = 1935
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 384
ScaleMode = 3 'Pixel
ScaleWidth = 582
Top = 2415
Visible = 0 'False
Width = 8850
WindowState = 2 'Maximized
Begin Timer Timer1
Interval = 600
Left = 600
Top = 5280
End
Begin Image PICT
Height = 2775
Left = 2520
Top = 360
Width = 2415
End
End
Sub Form_KeyPress (KeyAscii As Integer)
All_Done
End Sub
Sub Form_Load ()
mousecnt = 0
time_cnt = 1
FIRST_TIME = True
PasswordDslyd = 0
result% = 0
While (result% >= 0)
result% = showcursor(False)
Wend
a$ = Space$(3)
result% = GetPrivateProfileString("PWSAMPLE", "Timer Set", " ", a$, 3, "CONTROL.INI")
time_set = Val(a$)
If (result% = 0) Then
time_set = 1
End If
a$ = Space$(3)
result% = GetPrivateProfileString("PWSAMPLE", "PWProtected", "N", a$, 3, "CONTROL.INI")
PWProtected = a$
If (result% = 0) Then
PWProtected = "N"
End If
Randomize
PICT.Visible = False
PICT.Top = 0
PICT.Left = 0
PICT.Picture = LoadPicture("C:\WINDOWS\ARCHES.BMP")
PICT.Visible = True
End Sub
Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
If (FIRST_TIME) Then
OLDX = X
OLDY = Y
FIRST_TIME = False
Else
If (OLDX <> X) Or (OLDY <> Y) Then
All_Done
End If
End If
End Sub
Sub pict_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
If (FIRST_TIME) Then
OLDX = X
OLDY = Y
FIRST_TIME = False
Else
If (OLDX <> X) Or (OLDY <> Y) Then
All_Done
End If
End If
End Sub
Sub Picture1_Click ()
End
End Sub
Sub Timer1_Timer ()
On Error Resume Next
If (time_cnt >= time_set) Then
tmp = Int(800 * Rnd)
If (tmp > SCREEN.Width - PICT.Width) Then
PICT.Left = SCREEN.Width - PICT.Width
Else
PICT.Left = tmp
End If
tmp = Int(600 * Rnd)
If (tmp > SCREEN.Height - PICT.Height) Then
PICT.Top = SCREEN.Height - PICT.Height
Else
PICT.Top = tmp
End If
time_cnt = 1
Else
time_cnt = time_cnt + 1
End If
End Sub